package com.jt.www.enums.woxuebao;

import org.springframework.util.StringUtils;

import java.util.HashMap;
import java.util.Map;

/**
 * @author admin_ltf
 * @create 2019-06-01 16:05
 */
public enum YNXPXEnum {


    jc1("19XE103735", "19XEZ460036", "200000.0"),
    jc2("19XE288300", "19XEZ765503", "10000.0"),
    jc3("19XE761310", "19XEZ110202", "20000.0"),
    jc4("19XE442854", "19XEZ699183", "20元/天"),
    jc5("19XE629709", "19XEZ167900", "10000.0"),
    jc6("19XE861118", "19XEZ838606", "30000.0"),
    jc7("19XE315849", "19XEZ475581", "50000.0"),

    jc8("19XE731717", "19XEZ544823", "60000.0"),
    jc9("19XE656614", "19XEZ641838", "10000.0"),
    jc10("19XE729757", "19XEZ114610", "60000.0"),
    jc11("19XE725727", "19XEZ280219", "20元/天"),
    jc12("19XE535506", "19XEZ212528", "30000.0"),
    jc13("19XE360001", "19XEZ849320", "30000.0");


    private String code;

//    private String level;// 1 基础 2 加强

    private String valueCode;

    private String value;

    YNXPXEnum(String code, String valueCode, String value) {
        this.code = code;
        this.valueCode = valueCode;
        this.value = value;
    }

    public static Map<String, String> getRiskLimit(String code) {
        Map<String, String> map = new HashMap<>();
        if (StringUtils.isEmpty(code)) {
            return map;
        }
        for (YNXPXEnum hTCXAKEnum : YNXPXEnum.values()) {
            if (code.equals(hTCXAKEnum.code)) {
                map.put("value", hTCXAKEnum.value);
                map.put("valueCode", hTCXAKEnum.valueCode);
            }
        }
        return map;
    }

    public String getCode() {
        return code;
    }

    public String getValueCode() {
        return valueCode;
    }

    public String getValue() {
        return value;
    }
}
